import React from "react";
import { EditorMode } from "../types";
import Toolbar from "./Toolbar";
import LeftPanel from "./LeftPanel";
import RightPanel from "./RightPanel";
import ViewArea from "./ViewArea";
import MessageBar from "./MessageBar";

interface EditorLayoutProps {
    mode: EditorMode;
    onModeChange: (newMode: EditorMode) => void;
}

const EditorLayout: React.FC<EditorLayoutProps> = ({ mode, onModeChange }) => {
    return (
        <div className="editor-layout">
            <Toolbar mode={mode} onModeChange={onModeChange} />
            <div className="editor-content">
                <LeftPanel mode={mode} />
                <ViewArea mode={mode} />
                <RightPanel mode={mode} />
            </div>
            <MessageBar mode={mode} />
        </div>
    );
};

export default EditorLayout;
